#if !defined(__DBdata__)
#define __DBdata__
#include <QString>
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QDebug>
#include <QtSql>
#include <stdio.h>
#include "muser.h"
#include "cmysig.h"
#include "channelad.h"

class CDBdata 
{
protected: // create from serialization only


    // Attributes
public:
    CDBdata();
    ~CDBdata();
    QString getLastUser();
    void clearAll();
    bool loadUser(QString vname);
    long nextSampleId();
    long nextId();
    void removeVoltNew(long id);
    void insertTmpid(long id);
    void getChannels(QHash<QString, ChannelAD> * pgchannels);
   // CMySig loadSig(long id);
    //void saveSig(CMySig sig1,long id);
    //CString getsystemPwd();
    // Operations
//    static bool getAccessConnection(
//            const QString& accessFile, const QString& userName,
//            const QString& password);
    bool createConnection();
    bool ctable();
    void c();
    void r();
    void u();
    void d();

public:
    void loadMethodByid(long id);

};

#endif // __DBdata__
